package sun.superstring.extends1demo;

// 讲师：子类
public class Teacher extends People{
    // 继承了People类，所以Teacher类可以得到getter和setter方法，就相当于得到了name和sex

    private String skill;   // 技术

    public Teacher() {
    }

    public Teacher(String name, String skill, char sex) {
        // 子类调用父类构造器的应用场景
        // 可以把子类继承自父类这部分数据也完成初始化赋值
        super(name, sex);
        this.skill = skill;
    }

    public String getSkill() {
        return skill;
    }

    public void setSkill(String skill) {
        this.skill = skill;
    }
}
